Repository navigation
ci: run the test suite and request-boundary gate under opcache - #31
Merged
Merged
Conversation
Two new matrix jobs prove the package under an opcache-enabled engine on PHP 8.4 and 8.5: tests-opcache runs the whole PHPUnit suite with opcache.enable_cli=1, and request-boundary-opcache drives the FastCGI gate with opcache.enable=1, so preloaded-style SHM literals exercise the IS_STR_PERMANENT keep-by-pointer branch of Persister::persistStringSlot() across real RINIT/RSHUTDOWN boundaries. Guard steps assert opcache is genuinely active in the matching SAPI before anything runs. The four existing jobs now pin opcache.enable=0 and opcache.enable_cli=0 explicitly: the CGI SAPI defaults opcache.enable to On, so the request-boundary gate ran under opcache accidentally on runners shipping the extension enabled, which would have made the postures indistinguishable. JIT stays off in every leg because it rewrites the executor internals z-engine hooks into. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018oCKjaGwG27wE9rWdCqa6p
lisachenko
commented
Aug 20, 2026
lisachenko
commented
Aug 20, 2026
Review feedback on #31: the request-boundary-opcache job comes out of CI and stays as instructions for driving the gate under opcache locally (the CGI SAPI defaults opcache.enable to On, so an unpinned php-cgi runs it that way already), and a dependabot config keeps the workflow actions current. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018oCKjaGwG27wE9rWdCqa6p
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds opcache-enabled coverage to the CI matrix —
.github/workflows/ci.ymlonly, no source/test/tooling changes.Two new matrix jobs (PHP 8.4 and 8.5 each):
tests-opcache— the full PHPUnit suite withopcache.enable_cli=1(opcache.jit=off,opcache.jit_buffer_size=0), preceded by a guard step that asserts opcache is genuinely active in the CLI SAPI (opcache_get_status(false) !== false).request-boundary-opcache— the real php-cgi/FastCGI multi-request gate (tools/request-boundary/run.sh 100) withopcache.enable=1, preceded by a guard asserting opcache is active in the CGI SAPI. This is the leg that first exercises theIS_STR_PERMANENTkeep-by-pointer branch ofPersister::persistStringSlot()across real RINIT/RSHUTDOWN boundaries: under opcache, the gate script's compile-time literals live in opcache SHM and are kept by pointer instead of being copied into persistent memory.The four existing jobs now pin
opcache.enable=0, opcache.enable_cli=0explicitly. The CGI SAPI defaultsopcache.enableto On, so on runners that ship the extension enabled the request-boundary gate was already running under opcache accidentally — without the pin, the old and new gate legs would be indistinguishable rather than a differential.JIT stays off in every leg: it rewrites the executor internals z-engine hooks into.
Why
z-engine's opcache support recently landed, and FPM +
opcache.preloadis this package's blessed production setup (README "Deployment model") — yet no CI job loaded or enabled opcache (extensions: ffionly; the existingopcache.jit=offini value was inert). The one opcache-conditional code path insrc/had never run in CI.Verification
All legs replicated locally on PHP 8.4.24 and 8.5.9 (z-engine 8.4.2 / 8.5.0 resolved respectively), checking exit codes per AGENTS.md:
opcache.enable_cli=1: exit 0 on both minors (190 tests, 15642 assertions)GATE OK, exit 0 on both minorsOut of scope (deliberately deferred)
Opcache-group PHPUnit tests for the permanent-string path, an
opcache.preload/Core::preload()gate variant, and docs updates were planned but kept out of this pass at the author's request — CI changes only.🤖 Generated with Claude Code
https://claude.ai/code/session_018oCKjaGwG27wE9rWdCqa6p
Generated by Claude Code